<?php
class Front_Form_NewsCommentaires extends Jnd_Form
{
    protected $_utilisateurs = array();

    public function __construct( $decorateur = "Formulairejndpro", $options = null )
    {
        if (isset($options["utilisateurs"])) {
            $this->_utilisateurs = $options['utilisateurs'];
        }
        parent::__construct($decorateur, $options);
        $this->setElementDecorators(array(
            "$decorateur"
        ), array(), false);
    }

    public function init()
    {
        $this->setAction('/front/news/ajoutcommentaire');
        $this->setName("newscommentaire");
        $this->setMethod("post");
        $this->addAttribs(array(
            "class" => "cssform"
        ));
        
        $champ = new Zend_Form_Element_Hidden("id");
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Hidden("idNews");
        $champs[] = $champ;
        
        $champ = new Jnd_Form_Element_AdvancedTextarea("contenu");
        $champ->setLabel(__("Mon commentaire"));
        $champ->setAttribs(array(
            "toolbar" => "OsmlSimple",
            "height" => "150",
            "width" => "500"
        ));
        $champs[] = $champ;
        
        $this->addElements($champs);
    }
}

